package com.itheima.dbservice;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.itheima.mapper.SoulQuestionMapper;
import com.itheima.pojo.SoulQuestion;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class SoulQuestionServiceApiImpl implements SoulQuestionServiceApi{
    @Autowired
    private SoulQuestionMapper soulQuestionMapper;

    @Override
    public List<SoulQuestion> getQuestionsByQuestiontypeId(String id) {
        LambdaQueryWrapper<SoulQuestion> lqw = new LambdaQueryWrapper<>();
        lqw.eq(SoulQuestion::getQuestiontypeId, id);
        return soulQuestionMapper.selectList(lqw);
    }
}
